/*
 * 1458. 最小子矩阵
 * 给定一个大小为 n*m 的 矩阵 arr，矩阵的每个位置有一个可正可负的整数，要求从矩阵中取出一个非空子矩阵，让其包含的数字之和最小，输出最小子矩阵的数字和。
 * https://www.lintcode.com/problem/minimum-submatrix/description
 * 
 * 样例
 * Given a = [[-3,-2,-1],[-2,3,-2],[-1,3,-1]]，return -7.
 * Explanation:
 * The upper-left corner of the submatrix is (0,0), and the lowerright corner is (1,2). The minimum sum is -7.
 * 
 * Given a = [[1,1,1],[1,1,1],[1,1,1]], return 1
 * Explanation:
 * All numbers are positive, but the submatrix cannot be empty, so we take the smallest one.
 * 
 * 2018.06.30 @jeyming
 */
package minimum_submatrix_1458;

public class Minimum_submatrix_1458 {
    /**
     * @param arr: The given matrix
     * @return: Return the mininum sum
     */
    public static long minimumSubmatrix(int[][] arr) {
        // Write your code here
    	int n = arr.length;
    	int m = arr[0].length;
    	long min = 0x7fffffffffffffffl;
    	//System.out.println("n=" + n + " m=" + m);
    	
    	return min;
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int[][] a = {{-3,-2,-1,4},{-2,3,-2,4},{-1,3,-1,4}};
		System.out.println(minimumSubmatrix(a));
	}

}
